import sys
import pytest

if_win_skip_mark = pytest.mark.skipif(sys.platform=='win32',reason="win环境中跳过")
if_below_py39_skip_mark = pytest.mark.skipif(sys.version_info < (3, 9), reason="python3.9以下跳过")
not_complete_xfail_mark = pytest.mark.xfail(reason="代码开发中")
discard_xfail_mark = pytest.mark.xfail  # 也可以不带reason


@if_win_skip_mark
def test_case1():
    print("---skipif")
    assert 1 == 1


@if_below_py39_skip_mark
def test_case2():
    print("---skipif")
    assert 1 == 1


@not_complete_xfail_mark
def test_case3():
    print("---xfail")
    assert 1 == 1


@discard_xfail_mark(reason="废弃")
def test_case4():
    print("---xfail")
    assert 1 == 1

if __name__ == '__main__':
    pytest.main([__file__])